import { fetch, postWithJson } from '@/utils/http'

export function getGisTree() {
    return fetch('/ontology/tree/gis')
}

export function getGisList(params) {
    return postWithJson('/gis/list', params)
}
export function saveInstance(params) {
    return postWithJson('/instance/save', params)
}

export function findOperateProperties(params) {
    return fetch('/ontology/findOperateProperties', params)
}

export function findPropertiesByPropertyType(params) {
    return fetch('/ontology/findDistinctPropertiesByObjectUrisAndPropertyType', params)
}
export function getAssociationAttr(params) {
    return fetch('/search/detail', params)
}

export function getRelationInfo(params) {
    return fetch('/relation/listRelation', params)
}
// 保存快照
export function saveMapSnapshot(params) {
    return postWithJson('/gis/save/snapshot', params)
}

// 获取快照
export function getMapSnapshot(params) {
    return fetch('/graph/list/map/snapshot', params)
}

// 获取所拖对象的位置属性
export function getGisPrototype(params) {
    return fetch('/search/map/property', params)
}